#ifndef __THREAD_CTRL_H__
#define __THREAD_CTRL_H__
#include <pthread.h>
#include <limits.h>
#include <signal.h>

struct thread_param_t {
    char name[64];
    pthread_t id;
    volatile sig_atomic_t exit_sig;
};

struct thread_info_t {
    int num;
    struct thread_param_t *param;
};

void init_process_signal_handle(pthread_t *tid, void *(handler)(void *arg), struct thread_info_t *thread);
/* 线程取消 SIGUSR1 的阻塞 */
void init_thread_user_signal(void);
void *signal_handler_thread(void* arg);

#endif /* __THREAD_CTRL_H__ */
